// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(26,1) == 0;
	question = "special";
	text1 = "You enter an abandoned mine. It looks like it has been dormant for several years. The walls and support pillars are slowly crumbling, but it has not yet experienced a full cave-in.";
	text2 = "Now this mine has taken a new role: the first leg of the Shadow Road.";
	text3 = "Between natural caverns, mines, underground research outposts, and countless miles of holes bored out by loose clawbugs, Terrestia is honeycombed by boundless, uncharted networks of tunnels. Rogue serviles are using them to escape Shaper rule.";
	text4 = "The road is not without defenses. The snarls and hisses of the creations in the shadows echo easily to you. Any Shapers invading these tunnels would get a hostile reception. They may not be any more friendly to you.";
	text5 = "You sense the nearby presence of powerful creations. It makes you feel very nervous. Perhaps simply locating the Shadow Road is adequate for now. It might be wise to explore elsewhere.";
	action = SET_SDF 26 1 1;
	code =
		if ((gf(41,4) > 0) || (gf(36,1) > 0))
			rs(5);
	break;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	condition = get_sdf(26,1) == 0;
	question = "special";
	text1 = "You enter an abandoned mine. It looks like it has been dormant for several years. The walls and support pillars are slowly crumbling, but it has not yet experienced a full cave-in.";
	text2 = "Now this mine has taken a new role: the final leg of the Shadow Road.";
	text4 = "This section is also not without defenses. The snarls and hisses of the creations in the shadows echo easily to you. Anyone invading these tunnels would get a hostile reception.";
	text5 = "You sense the nearby presence of powerful creations. It makes you feel very nervous. Perhaps simply locating the Shadow Road is adequate for now. It might be wise to explore elsewhere.";
	action = SET_SDF 26 1 1;
	code =
		if ((gf(41,4) > 0) || (gf(36,1) > 0))
			rs(5);
	break;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(26,2) == 0;
	question = "special";
	text1 = "You find an interesting bit of magical machinery, constructed by the rebels who created the road's defenses. Power flows from a spiral in the eastern alcove and enters a magical circle. A glowing, green nimbus floats about the circle.";
	text2 = "Being near the circle gives you a warm, reassuring sensation. The energy here is probably for healing. Sadly, not healing for you.";
	action = SET_SDF 26 2 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";



begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "The machinery in this chamber is not new. It probably was used to process the products of the mine when it was still in operation. The rebels have since adapted this chamber to their own needs.";
	text2 = "There is a drayk standing on a low platform. Even by the standards of these unusually long-lived creatures it is very old. Its scales are gray and cracked. It can barely stand and can no longer walk.";
	text3 = "Some of the conduits on the floor actually pass through its body, providing the energy which keeps it chained to life. Its skin glows faintly. You notice that a key hangs from a chain around its neck.";
	text4 = "When it sees you, it lets out a long hiss. _Ssssss ... I am Gresss. You should not be here. Intruder ... You are an intruder. Hsssss ... Spiesss mussst be destroyed._";

begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = has_item_equip(376);
	question = "Wait ... Look at this! (Show the passage amulet.)";
	text1 = "The drayk lets out a long, dry chuckle. _You are tall for a servile._";
	text2 = "_I know all the guidesss. You are not one. You are a spy. You can fool the dumb creationssss. You cannot fool me._";
	code =
		if (creature_type(pc_num()) == 46) 
			rs(1);
	break;

begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Wow. You are old.";
	text1 = "_Do not try to win me with flattery. I spent my life hiding from the Shapersss in cavesss like thisss one. Now I spend that time helping to fight them._";
	text2 = "_I get to kill Shaper spiessss. Like you!_";

begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I am no spy.";
	text1 = "_Maybe. Maybe not. Hsssss. It does not matter to me. Now that you have seen what you have seen, you cannot essscape._";
	text2 = "";

begintalknode 14;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I'm leaving. Chase me if you can.";
	text1 = "Though the drayk controls the defenses and replaces the guardians, it can't actually walk. You are able to flee.";
	text2 = "As you turn to run, you hear a deep humming sound. The drayk directs the flow of power to the platforms around it. You see faint, insubstantial shades begin to form on them. Though the drayk can't chase you, its servants might.";
	action = END_TALK;
	
begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Prepare to die, hideous creature.";
	text1 = "The drayk digs its brittle claws into the stone and opens its mouth. Wisps of smoke come out. It can't walk, but the fire within it remains.";
	text2 = "You hear a deep humming sound. The drayk directs the flow of power to the platforms around it. You see faint, insubstantial shades begin to form on them. They aren't solid yet, but they will be soon. The room suddenly becomes cold.";
	action = END_TALK;

	
//

begintalknode 30;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the creations guarding this mine shaft sees you. It doesn't attack, at first. It looks at your chest. It spends several seconds staring at you, definitely looking for something. It doesn't see it.";
	text2 = "Then it attacks you.";

begintalknode 31;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the creations guarding this mine shaft sees you. It doesn't attack. It looks at your chest and sees the amulet you are wearing. Then it looks at you, confused. You aren't who it expected to see.";
	text2 = "You try to take advantage of this delay and calm down the creature. You try soothing words and hand motions, but you just can't establish the right level of control. The creature attacks.";

begintalknode 32;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the creations guarding this mine shaft sees you. It doesn't attack. It looks at your chest and sees the amulet you are wearing. Then it looks at you, confused. You aren't who it expected to see.";
	text2 = "You try to take advantage of this delay and calm down the creature. With soothing words and hand motions, you are able to calm it. It resumes guarding the tunnel.";

begintalknode 33;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Another loud noise echoes through the tunnels. It's a shrill, hideous squeal, that makes your skin crawl and your hair stand on edge. You doubt that there is a creature in these mines that did not hear it.";
	text2 = "It sounded worryingly like an alarm.";

begintalknode 34;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the shades on the platforms in the alcoves is fully formed. It begins to slowly float toward you. The air around you becomes very cold. Ice crystals form instantly on the floor below it.";

begintalknode 35;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Ghesss howls in pain and fury. _Ahssss! You may end me, but I will take you in return! All the power ... Ssss! All the power! I unleash it all!_";
	text2 = "The conduits at its feet begin to glow even brighter. Sparks fly out of them. You smell smoke, and the ground vibrates slightly under your feet.";
	text3 = "Then the eruption ends. You see shades forming on several of the platforms.";

begintalknode 36;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "At last, Ghesss's long life is at an end. It died where it was born and lived: in a miserable cave, hiding from the Shapers.";
	text2 = "The body immediately begins to smoke. The power of the conduits will soon reduce the body to ash.";
	text3 = "You grab the key it wears around its neck before it is destroyed.";
	code =
		set_spec_item(48,1);
	break;

begintalknode 37;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		